package com.xiaohudie.thread;

/**
 * @Author xiao hu die
 * @Date 2022/2/21 10:57
 * @Version 1.0
 */
public class Test05 {
 public static void main(String[] args) throws InterruptedException {
  Thread5 thread5 = new Thread5();
  thread5.start();
  Thread.sleep(5000);
  System.out.println(Thread.currentThread().getName());
  ;
 }
static class Thread5 extends Thread{
 @Override
 public void run() {
  for (int i = 0; i < 5; i++) {
   try {
    Thread.sleep(1000, 1);
   } catch (InterruptedException e) {
    e.printStackTrace();
   }
   System.out.println(Thread.currentThread().getName());
  }
 }
}
}
